package org.lease.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.lease.mapper.DistrictInfoMapper;
import org.lease.model.entity.DistrictInfo;
import org.lease.service.DistrictInfoService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DistrictInfoServiceImpl extends ServiceImpl<DistrictInfoMapper, DistrictInfo> implements DistrictInfoService {
    @Override
    public List<DistrictInfo> listByCityId(Long cityId) {
        LambdaQueryWrapper<DistrictInfo> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(DistrictInfo::getCityId, cityId);
        return list(wrapper);
    }
}
